<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/jquery-1.4.2.js"></script>
</head>
<body>

    开始时间：<input type="text" name="startDate" id="startDate">
    结束时间：<input type="text" name="endDate" id="endDate">
    <button class="btn">提交时间</button>


<script type="text/javascript">

    $(".btn").click(function () {
        console.log("点击发送ajax请求");
        $.ajax({
            url: "/attendance",
            data: {
                startDate: $("#startDate").val(),
                endDate: $("#endDate").val()
            },
            success: function (result) {
                console.log(result);
            }
        });
    });

</script>
</body>
</html>